package com.ruoyi.erp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.LedyUserSimpleMapper;
import com.ruoyi.erp.domain.LedyUserSimple;
import com.ruoyi.erp.service.ILedyUserSimpleService;

/**
 * 办案人员Service业务层处理
 * 
 * @author ztj
 * @date 2023-04-06
 */
@Service
public class LedyUserSimpleServiceImpl implements ILedyUserSimpleService 
{
    @Autowired
    private LedyUserSimpleMapper ledyUserSimpleMapper;

    /**
     * 查询办案人员
     * 
     * @param id 办案人员主键
     * @return 办案人员
     */
    @Override
    public LedyUserSimple selectLedyUserSimpleById(Long id)
    {
        return ledyUserSimpleMapper.selectLedyUserSimpleById(id);
    }

    /**
     * 查询办案人员列表
     * 
     * @param ledyUserSimple 办案人员
     * @return 办案人员
     */
    @Override
    public List<LedyUserSimple> selectLedyUserSimpleList(LedyUserSimple ledyUserSimple)
    {
        return ledyUserSimpleMapper.selectLedyUserSimpleList(ledyUserSimple);
    }

    /**
     * 新增办案人员
     * 
     * @param ledyUserSimple 办案人员
     * @return 结果
     */
    @Override
    public int insertLedyUserSimple(LedyUserSimple ledyUserSimple)
    {
        ledyUserSimple.setCreateTime(DateUtils.getNowDate());
        return ledyUserSimpleMapper.insertLedyUserSimple(ledyUserSimple);
    }

    /**
     * 修改办案人员
     * 
     * @param ledyUserSimple 办案人员
     * @return 结果
     */
    @Override
    public int updateLedyUserSimple(LedyUserSimple ledyUserSimple)
    {
        ledyUserSimple.setUpdateTime(DateUtils.getNowDate());
        return ledyUserSimpleMapper.updateLedyUserSimple(ledyUserSimple);
    }

    /**
     * 批量删除办案人员
     * 
     * @param ids 需要删除的办案人员主键
     * @return 结果
     */
    @Override
    public int deleteLedyUserSimpleByIds(Long[] ids)
    {
        return ledyUserSimpleMapper.deleteLedyUserSimpleByIds(ids);
    }

    /**
     * 删除办案人员信息
     * 
     * @param id 办案人员主键
     * @return 结果
     */
    @Override
    public int deleteLedyUserSimpleById(Long id)
    {
        return ledyUserSimpleMapper.deleteLedyUserSimpleById(id);
    }
}
